<template>
<DatePicker :value="dateRange" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" placement="bottom-end" placeholder="选择日期范围" @on-change="handleOnChange"></DatePicker>
</template>

<script lang="ts">
import { Component, Vue,Inject, Prop,Watch } from 'vue-property-decorator';
import AbpBase from '../../lib/abpbase'

@Component
export default class CustomDateRangePicker extends AbpBase{
    @Prop() model:any;
    @Prop() beginProp:string;
    @Prop() endProp:string;
    get dateRange() {
        return [this.model[this.beginProp], this.model[this.endProp]];
    }
    handleOnChange(value) {
        this.model[this.beginProp] = value[0];
        this.model[this.endProp] = value[1];
    }

}
</script>

<style>

</style>
